package cn.xopencode.recordservice.convert.pdroom;

import cn.xopencode.common.framework.vo.PageResult;
import cn.xopencode.recordservice.dal.mysql.dataobject.pdroom.PowerDistributionRoomDO;
import cn.xopencode.recordservice.rpc.pdroom.dto.PowerDistributionRoomCreateDTO;
import cn.xopencode.recordservice.rpc.pdroom.dto.PowerDistributionRoomPageDTO;
import cn.xopencode.recordservice.rpc.pdroom.dto.PowerDistributionRoomQueryDTO;
import cn.xopencode.recordservice.rpc.pdroom.dto.PowerDistributionRoomUpdateDTO;
import cn.xopencode.recordservice.rpc.pdroom.vo.PowerDistributionRoomPageVO;
import cn.xopencode.recordservice.rpc.pdroom.vo.PowerDistributionRoomUpdateVO;
import cn.xopencode.recordservice.rpc.pdroom.vo.PowerDistributionRoomVO;
import cn.xopencode.recordservice.service.pdroom.bo.PowerDistributionRoomBO;
import cn.xopencode.recordservice.service.pdroom.bo.PowerDistributionRoomCreateBO;
import cn.xopencode.recordservice.service.pdroom.bo.PowerDistributionRoomPageBO;
import cn.xopencode.recordservice.service.pdroom.bo.PowerDistributionRoomUpdateBO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface PowerDistributionRoomConvert {

    PowerDistributionRoomConvert INSTANCE = Mappers.getMapper(PowerDistributionRoomConvert.class);

    PowerDistributionRoomDO convert(PowerDistributionRoomCreateBO bean);

    PowerDistributionRoomUpdateVO convertUpdate(PowerDistributionRoomDO bean);

    PowerDistributionRoomCreateBO convert(PowerDistributionRoomCreateDTO bean);

    PowerDistributionRoomUpdateBO convert(PowerDistributionRoomUpdateDTO bean);

    PowerDistributionRoomDO convert(PowerDistributionRoomUpdateBO bean);

    PowerDistributionRoomBO convert(PowerDistributionRoomQueryDTO bean);

    List<PowerDistributionRoomBO> convertList(List<PowerDistributionRoomDO> list);

    PowerDistributionRoomPageBO convert(PowerDistributionRoomPageDTO bean);

    List<PowerDistributionRoomVO> convertList02(List<PowerDistributionRoomBO> list);

    @Mapping(source = "records", target = "list")
    PageResult<PowerDistributionRoomPageVO> convertPage(IPage<PowerDistributionRoomDO> page);

}
